$(function () {
    loading();
    var cookie = new sweetCookie();
    var ext_id_Json = cookie.getCookie('ext_id');
    if (ext_id_Json && ext_id_Json != "\"\"") {
        var ext_id = decodeBase64(ext_id_Json, 3);
        ext_id = isNotEmpty(ext_id.split("extract_")[1]) ? ext_id.split("extract_")[1] : isNotEmpty(ext_id.split("extract_")[0]) ? ext_id.split("extract_")[0] : '';
        if (!isNotEmpty(ext_id))
            window.history.go(-1);
        else
            ajaxselectExtractDetail(ext_id);
    } else {
        window.history.go(-1)
    }
})

/**
 * 加载 单次 提现记录详情
 * @param id    提现记录的id
 */
function ajaxselectExtractDetail(id) {
    var url = "/Lvscore_User_M/adScore/ajaxselectExtractDetail";
    $.post(
        url,
        {'id': id},
        function (e) {
            $("#constumName").text(e.constumName);
            $("#orderId").text(e.orderId);
            $("#totalCost").text(parseFloat(e.money) + parseFloat(e.servicePay));
            $("#servicePay").text(e.servicePay);
            $("#money").text(e.money);
            $("#accountType").text(e.accountType);
            $("#allMsg").text(e.accountUserName + "（" + e.targetName + "：" + e.bankCardNum + "）");
            $("#createTime").text(e.createTime);
            $(".loadingBox").hide();
        },
        "json"
    );
}